workaround for bug, minor style tweaks