Fixed regression from fixes applied to #3044