Fixing error in cast in previous commit