Fixed cast button click bug.