fixed bug in latest.js