fix for #28, #29