Problem with nested associations

I have a department which has many courses which has many sections
however when I try to access
course.sections.create or create a section and save I get an error.

ActiveRecord::StatementInvalid: SystemStackError: stack level too
deep: SELECT * FROM courses WHERE (courses.department_id = 1)

Any ideas what's going on?