Fix regression bug with incorrect tile creation