style tweaks + fix for #1061