Replaced auto fith explicit type to allow GCC to compile in Ubuntu