fix to work with both carrierwave & paperclip