couple of quick bug fixes