add missing end in preferences controller