fixed wrong type for stack