fix error after upgrading of paperclip.