remove redundant type cast, fix a typo