At least I understand why now, even if the solution is ugly.