Fix. read callback hangup if it returns wrong value