Fixed reopen function, Fixed first start