storage: Some bug fixes