Caching and fix to osSort