Fix for #20, #21