Fixed undefined value result