fixed major problem with FID-generation
remove dead code