Fix tile offset bug