fix returning wrong values for getKeys for resources