fixing leak and bug of read returning -1
Merge branch 'develop' of github.com:janteuni/Zappy into develop