Fixed possible bug.
Potential DoS fixed.
Fixed possible problem.
Fixed connection bug.
Updated TODO.