Fix for #26 & #28