Grabbing from Pomax' version.