fixed some delay and connection issues. Note to all: do NOT insert thread.sleep in game anymore. too ugly and cannot be maintained for replay and reconnection features