another attempt to fix the bug