Fix for #119, #134