Fix for cast bug. Minor.