fix output and sync