fix problem when depth > max fit region