Fixing bugs... Now it works with the example programs