Add sync and tty resize to attach