Fixed segfaults - updated all calls to enter scope to calls to add scope