added typecast to addTransition invocation.