few more bug fixes