Tried to fix "Invalid socket and type read" message of QSocketNotifier
Fixed some segfaults