Modified by @exabugs.