Fixed a bug that does not work with Redmine-2.x.