Region of interest coding is an important feature in JPEG2000 and it is accomplished by pre-emphasizing the wavelet coefficients participating in the reconstruction of the ROI. In the general scaling-based method, a number of extra bits appear in the right side of the least significant bit of the ROI samples after the shifting process. These bits need be coded at the time of bit-plane coding, but they are discarded by the decoder. The usual procedure is for the encoder to set these "don't care" bits to zero. In this paper, we propose a method that exploits the state of the JPEG2000 entropy coder to set the values of these bits in a more intelligent way. The method can be implemented with only a small increase in coder complexity and improvements of up to 6% in the number of bits required to represent a code-block has been observed. The bit-stream remains JPEG2000 compliant.