added preferences and active modal