patch applied from Sivan Kievit - please put in @author tags in the future PR: Obtained from: Submitted by: Reviewed by: