fix Stack and SQueue implementation