bug fix and multi-neighour fit