fixed the bug