fixed code to work with the current nightly build.