fixed crashing issue when caching and fixed warlock bug