[Reviewer Andy] Fixes to Ralf issues 45 and 47

Andy

Can you review my fixes to https://github.com/Metaswitch/ralf/issues/45 and https://github.com/Metaswitch/ralf/issues/47.  Both fixes were pretty trivial.  I've tested by updating the UTs that fail (as expected) with the fixes in place.

Mike