fixing errors from error log