Switching back to original window does not seem to work

I have a test which clicks on a button to spawn a new window (indicated by index 1). The test then successfully acts upon this window before then closing it and apparently returning to window 0. Problem is the test seems to stall at this point and does not act upon the very next step or for that matter any other further steps in the test. This all worked fine on the initial recording of the test and nothing I have tried so far has managed to get the test running the rest of the steps. Is there anyway to get this working or at least try and see what is happening to prevent the test from working?

Closing this as I found the issue - the test had added a close window and switch window steps automatically but setting both to inactive so they did nothing allowed the other steps to run fine. Not sure why the switch window step was not functioning correctly though given there was only the one test window present.