Small API fixes

- memory engine: hasKey