Windows Opens Then Closes Then Opens Again