Address reviewers comments: less casts needed.