fix on sql operation