Fixing the bug