fix match lifecycle
clean up permission system