sell detail edit and miscellaneous fixes