Fixed bug with shared