fixed cloning of asset references

fixes #611
fixes #532
fixes #537
fixes #617 

Fixed.