fixes bug with domain range in context