Fixed tile encoding issue