Castling hotfix

Empty corner check has been fixed.
Reconnect has been added, but not debugged.