forked from: Very stable collision resolver

