Profile form fix

Resolves issue #840, where profiles with ManyToManyFields aren't rendered correctly.