fixing lots of problems.