Fixed a bug with TargetMode and improved TileHelper