added Huub's fix for a bug in the parseTwip function