When creating a cast, move it to input slot for direct use.
Merge pull request #865 from bonii-xx/new_pr

When creating a cast, move it to input slot for direct use.