some markets-related bug fixes.

Signed-off-by: FellowTraveler <F3llowTraveler@gmail.com>