Fixed another bug... containsKey rather than contains