minor fix for retrieving ts from key, test setup