Fix prediction code.