Fix modal when window opens after first time