fixed some bugs that popped up