modal automatically opening after finishing game