fixes loosing form data when change between components