Some changes for paperclip