bugfix for key lookup