fixed the bug raised by code validator