fix another bug/notice, about sql query returning false