A simple way to keep a hostile witness under control is to ask questions that can be answered only one of three ways: "yes," "no," or "I don't know." If given no opportunity to explain, the witness won't try to do it as often.
As is true of any good cross-examination, this method requires you to ask very short questions. It's a good habit to get into. You'll use the short questions to lead the witness in the direction you want him to go, rather than the other way around.