fixing relation count