Resolve compiler type safety warnings