Form collapse conditions work only for first time