bug fixes for multi-pass drawing and HDR mode