Fix for #519