fix a bug when return_eps_0==TRUE