fixed a bug in ReinhardTMO