Fixed memory leak on timestamp query failure caused by setting
query_in to NULL, thereby preventing it being freed.

Added error propagation in timestamp packing, instead of just logging.

Fixed some typos