Added dropped connection handling. Closes #9