Error: Call to a member function getActive() on null: Call to a member function getDefault() on null