Fixed a couple of bugs that leaked in 1.4 release

Unfortunately the bugs happen in mocked function
not tested at all by our test methods. They will
be addressed by issue #17