Default shared state = -1 (not set yet)
Cast the shared state to int