Fix closes bug and make accept show dialog