Added fix for #29/#24