select modes fixed by re-introducing the selectmode field in document