Both bugs fixed. :)
The time ran out when you were at the market, and the trigger to restart the game was overlapping with the triggers of buying/selling stuff after the time runs out.
Anyway, thanks!