fixes for #14 & #16