fixing issue with stack example in generics.