fixed bug in timestamp completion, added test case