Updated to work with newer outputs