bug fix
minor working edits