TODO:
 - Fix the preferences object priority (copy some properties can solve the problem)