fix problems with nested resources
review controller fixes