Fixed issue sql command