Fixed bug in REST associations