fixed bug in shared data - invalid memory access, no printfflush