fix bug in delete: was deleting keys greater than that requested.