Fixed some more annoying bugs