fixing bug #5125
fixing bug #5174 by using right method