trying to fix the bug(not tested)