changes for #255, #81