fixed errors that occurred