paperclip and fixed some small bugs