fixes for #525