fixed erb bugs