fix reference picture modification bug -- review #67