fixed a bug where caching fails on empty values