Changed to static_cast, due to post-commit review.