added test 'post_transition fails' & code cleanups