This should fix the issue (after an hour of debugging)