Small bug fix when creating context from a path.