bugfix on remote apply