fixing issue of closing in trader 6