fixing errors from error_log