Removed duplicate mask application from cache retrieval