Fix preferences dialog