fix transition generation, initial transition from top entry, fix guards generation