fix the bug when opt is not put