Fix for Working on redmine 2.1.4

Make many fix for working on redmine 2.1.4