Fix for #22; not sure of side effects