Fixing small bugs in Cookie