fixes the bug