fix minor bugs
process trades only once per cycle