Module: fixed SQL query that returned too many results