WeakMap implemented but not working