try shared elements again
Fix allocation problem