Fixin some bugs