Fixed preferences scope in xmodules.

@rocha 
@dianakhuang