Bug fixed. Now all tests passed.