fixin some bugs