Fix for distance-based chat not working. Thanks to Nyarlko for this fix. Related issues: #2 #4