resolved some crazy errors