Fixed bad cast.