Remove unnecessary semi-colon from query