Fixed multiple errors