Fixed share issue. Fixe other bugs