Fix for #50 & #110