Fixed small bug in get_context