Fixed wrong cast.