fixed some major problems.