fixed the bug myself