Prevents applicationcrashes which occured random by ArrayIndexOutOfBound...

...sException

See issue #40 and #44. This patch fixes the random crashes occured by Exceptions thrown on disconnect.