fixed failing tests and key store wireup