#386 Fixed duplicate index removal
#386 Fixed truncate errors because of null values