Fix for #308