add limit for steps to avoid runaway memory consumption by collision handling