Removes attach to Window