Fixes to bug #105 & #106