fixed bugs when using element graphics with non-standard tile size