Better chunk distance calculation