fix of issue #718: Error parsing file imported from Pocket #718

fix itself is in lines 1096-1104, other changes are related to latest (but a bit old anyway) revision of original file.