Appium 1.5 - problem with SwitchTo functionality

Hi,
After I tried to change appium version from 1.4.16 to 1.5.2, I encountered a problem in iOS simulator.
I have a scenario, that I click button and open another window.
I want to move to the opened window using Driver.SwitchTo().Window function.
But I get the exception
“A request to switch to a different window could not be satisfied because the window could not be found”.
I run exactly the same scenario using Appium version 1.4.16 and it doesn’t happen.
Can anyone help with this issue?
Thanks