mifosx-986 fixes from andrew