Fix tile detection