fixed compilation error from BufferedStack