fixed ERD problem