Fixed syntax error with select statement

Fixed a syntax error caused by a missing "do" keyword. This keyword has
been readded.