fixed functionality of libkey check