Added lock when withdraw states transition