Fixed showing patient dialog at correct time (hopefully)