Added some traces to find the bug