Fix the bug that was in the code