Fix cast exception in some schedule transaction
Fix Passcode handled in some case