Missing cast and typo