Revert earlier bugfix attempt, causes other issues