couple of more bug fixes