fix naive bug