Attempt to fix invalid contexts

This fixes some of the output seen in #56, but I am not sure if the issue is referring to other issues as well.

/cc @unixpickle: this is another slider-related issue it seems. Is there a better way to handle this? Why wouldn't a context be successfully created? :unamused: