Fix for #59 & #104