Share preview fix

code cleaning needs to be done