some quick bug fixes