Fix nubugger and other minor fixes