Check that `_prefs` is declared almost at the end of file so if you are using it on the main function, you should use it after it is declared.