Fixed syntax error
Added limited preferences support