Fix for #37 #17