bug fixes for recent changes