fixes and adding missing stuff back.