type conversion and typo fix