varuious minor fixes