Patch from Dotan Barak <dotanba@gmail.com>: