Applied fix from rap1ds