Improved code to check if an inappropriate window is opend after autosubscribe