better fix for collision bug