Fix error with empty contextCode