some logical fixes, nvmd