Merge "Fixed a few sanity checks." into nextgenv2