Two small bugs fixed in nanocat

The patch is submitted under MIT License