fixing the bug