fixed #8, but it's only for the select all query