Fix bug in erb utility method