fixed SPContext bug, would crash if context was nil