Question: I'm trying to write a BOOL value to a column in PFInstallation but get crashes nonstop: 

```
- (IBAction)pushSwitch:(id)sender {
NSUserDefaults *pushlocationStatus = [NSUserDefaults standardUserDefaults];

if (self.pushSwitch.on) {
    [pushlocationStatus setBool:YES forKey:@"pushlocationStatus"];

    PFQuery *query = [PFInstallation query];
    [query whereKey:@"objectId" equalTo:[PFInstallation currentInstallation].objectId];
    [query getFirstObjectInBackgroundWithBlock:^(PFObject *pushlocationObject, NSError *error) {
        pushlocationObject[@"locationPref"] = @YES;
        [pushlocationObject saveInBackground]; 
    }];
} else {
    [pushlocationStatus setBool:NO forKey:@"pushlocationStatus"];

    PFQuery *query = [PFInstallation query];
    [query whereKey:@"objectId" equalTo:[PFInstallation currentInstallation].objectId];
    [query getFirstObjectInBackgroundWithBlock:^(PFObject *pushlocationObject, NSError *error) {
        pushlocationObject[@"locationPref"] = @NO;
        [pushlocationObject saveInBackground];     
    }];
}
}

```

Any suggestions on how to fix the crash : 

I need it to update in PFInstallation because not everyone is required to sign up to use my services, however, i want to be able to not send a push to these people the elect to not receive it.

Answer: 
Okay. For anyone else having the same issues there is a work around to writing directly to your Installation class, which i never doubted was a problem, I still haven't figured out how to query the class directly, but for now to work around an issue to writing to your Installation class is simple... just don't query it, and simply write to it. Here is what i used to fix my if statement:

```
- (IBAction)pushSwitch:(id)sender {
NSUserDefaults *pushlocationStatus = [NSUserDefaults standardUserDefaults];

if (self.pushSwitch.on) {
    [pushlocationStatus setBool:YES forKey:@"pushlocationStatus"];

    PFInstallation *installation = [PFInstallation currentInstallation];
    [installation setObject:@YES forKey:@"locationPref"];
    [installation saveInBackground];

} else {
    [pushlocationStatus setBool:NO forKey:@"pushlocationStatus"];

    PFInstallation *installation = [PFInstallation currentInstallation];
    [installation setObject:@NO forKey:@"locationPref"];
    [installation saveInBackground];
}
}

```

Thats just an example. This helps greatly with customizing your Push Notification options for segments.
I believe this

```
PFQuery *query = [PFInstallation query];
[query whereKey:@"objectId" equalTo:[PFInstallation currentInstallation].objectId];
[query getFirstObjectInBackgroundWithBlock:^(PFObject *pushlocationObject, NSError *error) {

```

Can be replaced by

```
[[PFInstallation currentInstallation] fetchInBackgroundWithBlock:^(PFObject *pushlocationObject, NSError *error) { ... }];

```