add back the checkContext removed from bad merge with develop