Fixing issue with custom user form, ported from pydanny's original.