wip button, fix modal state, spin event loop