patch for RM 2.4 from http://www.redmine.org/boards/3/topics/41773