fixed issues with mem_fn().