Fixed a few additional bugs