fixing contexts bug