Suppress unchecked warning in cast