fixing errors from error logs