Adjust code to work with latest nightly