Patch from Bart Van Assche <bart.vanassche@gmail.com>: