Added write-write dependency and fixed pointer bug