Fixes to refactored ERB renderer