Try to troubleshoot using debugger so you can spot a problem. As long as the timer value still less or equal than 0, the action will proceed "Go to next layout" when hit a new layout. Imagine if there are 10 layouts the command will executed as if it skips every layout till the last one. So set back timer to any value greater than 0 on start of layout or end of layout.