some fixes for #1144