Add synchronized block around method re-definitions