fixed some bugs

might have created a few new