Safe JSON parse method
Fixed Stack and Principal selectors