Added missing semicolons
Changed example and fixed a bug