fixed the bug that thrown exception on normal stuation.