Fix segmentation fault on 32-bit systems (bad printf format)
Fix a memory leak when a request on the database is unexpectedly empty
Improved documentation