fix "fence post" error