Fixed erros in last commit.

this one was tested (some)
hopefully it merges cleanly