fixed rest template get bugs.