Made similar changes in the tilesheet loading method.