fixes #185 display error conditionally and some standards fixes