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

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