fix much errors in erb