fix for #495