fix script error after core canges which made revision not always available