fixed bug in erd