apply evan's patch