Small bug fixes in Cache and Annotations classes