You should not need the cast here. It hides bugs.