fixed bug in latest snapshot method