Silenced a warning, removed unnecessary casts.