Fixed syntax faults and bugs.