tileserver: fix logic