monir fix from Rob's svn history