Fixed bug in caching which resulted in multiple results.