bug fixes
minor bug fixes and removal of print debugging print statements