Bugfix: some return values were always 0 (rev. 2)

Signed-off-by: nixnodes <code@eth.si>