Only check for child window when needed, some cleanup