Fixed a critical bug. A context variable was not initialised to zero, and had a garbage pointer. Now this works well.