program package ! Extra }, or forgotten \endgroup

I took the STY files(elsarticle.zip) from the following link - http://www.elsevier.com/wps/find/authorsview.authors/elsarticle#models

I am using program package and I want to include the keywords in my paper. However, whenever I include the program package, I get an error.

! Extra }, or forgotten \endgroup.
\endkeyword ->\par \egroup
l.34 \end{keyword}


Here is my latex code, which I have stripped down to see if there was any error. If I remove the program package, it works perfectly fine. Or otherwise if I remove the Keywords part, then also it compiles just fine. However, I need both of them. Could anyone please help?

\documentclass[preprint,1p]{elsarticle}
\usepackage{etex}
\usepackage{amssymb,amsmath}
\usepackage{cite}
\usepackage{array}
\usepackage{url}
\usepackage{multirow}
\usepackage{listings}
\usepackage{epstopdf}
\usepackage{color}
\usepackage{tikz}
\usepackage{program}
\usepackage{pgfplots}
\usepackage[tight,footnotesize]{subfigure}
\usepackage{comment}
\usepackage{soul}
\graphicspath{{./Figures/}}
\journal{Microprocessors and Microsystems}
\begin{document}
\begin{frontmatter}

\title{Title of my report}

\begin{keyword}
keyword1 \sep keyword2 \sep keyword3 \sep keyword4
\end{keyword}

\end{frontmatter}
\end{document}

-

You can keep the syntax with the following trick for loading program:

\makeatletter
\let\elsarticle@keyword\keyword
\makeatother
\usepackage{program}


Then you can still say

\begin{frontmatter}

\title{Title of my report}

\begin{keyword}
keyword1 \sep keyword2 \sep keyword3 \sep keyword4
\end{keyword}

\end{frontmatter}


and use \keyword as defined by program in the body of your document. I think that the copy editors of the journal you're submitting the paper to will be happier if the syntax is not modified.

-

The keyword environment macros can be saved with a different name, before you load the program package, which defines its own \keyword macro:

\let\elskeyword\keyword
\let\endelskeyword\endkeyword
\usepackage{program}
...
\begin{frontmatter}
\title{Title of my report}
\begin{elskeyword}
keyword1 \sep keyword2 \sep keyword3 \sep keyword4
\end{elskeyword}
\end{frontmatter}

-
Thanks a lot Stefan ! The answer worked perfectly fine. Just a doubt that the command keyword was modified by the program package? – knowledge_seeker Aug 28 '12 at 13:54
program.sty uses \keyword for markup, such as bold or uppercase. For example, from program.sty: ... \def\keyword##1{\mbox{\normalshape\bf\sf ##1}}% ...  – Stefan Kottwitz Aug 28 '12 at 14:22