Fixing errors and updating example