Fixed spelling/logic errors