Dry run improvements

This is further improvements on #1028.