Bug fix for not returning the correct number of ids from getKeys when a filter was used.