Fixed leaking Activity reference and Dialog reference