fixed compiler error regarding auto