cleaned up some minor bugs