Fixed collision function