fix issues in metatile class