Finally found the bug on exceptions.