Fixed some minor errors with the new code.