Added Autotile algo, but it bugs