Added somehow missing code from previous versions.