Updated to work with newer library