fixing a bug about double rendering when caching is enabled
Merge pull request #87 from Systho/master

Fixing a bug about double rendering when cache is enabled