wrong argument when executing query