Trading bug fixes