Make sure toggleModal works within toggleModal