fixes to caffe