Fixed the bug in HDR2TIF