Modal component and fix bugs