fixed sql exception.