Take care of zero tolerance
Fix problem with zero tolerance