bug fixes for mifosx-519, 516, 361 and 362
Merge pull request #451 from vishwasbabu/mifosx-500

bug fixes for mifosx-519, 516, 361 and 362