Replace rule value with proper variable