Fix cache locking
Cache maybe empty