Added collision handling