Fix model setting on associate method. Fixes #1366.