Code from version 2.0RC5