fix variable interpolation with patch