Added FMM contact detection