ported changes from current cinder patch