fixes for #524