Fix: sql for nextmap