Fixed multiple rendering bugs.
Performance: rescale the scaled map first, only refine it in 1s intervals.