minor bug fix and judge RTE correction