Fixed Shared Memory issues