fixed: SQL query was wrong