fix useModal not working correctly