BUG: fix return value from query if data is already in input buffer, fixes #62
BUG: fix return value from query if data is already in input buffer, fixes #62

SiLab-Bonn/basil,SiLab-Bonn/basil,MarcoVogt/basil