fixed a bug causing contests not to close properly.