fix segfaults on empty tiles