bug fixes

did bug fixes