minor gradient fix
fixed gradient being set to black around
the edges on non multiple of 3 resolutions