fixed a bug with tiling backgrounds