minor bug fixes for last commit