fixing bug in automatedcast