Fix "ORDER BY" bug. ORDER BY word is appended without space before it if any condition is present in SELECT statement