fix get scheme function