Minor bugfixes. Fixes #1, fixes #2.

Signed-off-by: Mike Burke <mike@livioconnect.com>