Second attempt to fix the bug