Fixed collision crash
Refactroy code :d