Fix deprecated use of queryForInt()