changes for #149 and #151