fix contest bugs