Fix for #4 and other