Fixed render overlap by storing greater value in temp buffer