Fixed some additional bugs.