Fixed spikes collision problem caused by refactoring