Fixed various small errors