bugfix: findClosestOf did not respect maxDistance in some cases
bugfix: type in debug message
bugfix: wrong call syntax