Attemp to fix #22 with class caching.