bug fix
misc changes