Minor spelling and bug fixes