Eliminated warnings about unchecked casts