fix get baytrain code