Fix bug and set acitiviy's connection

Signed-off-by: Lee <jessy1092@gmail.com>