fixed cookie registering proble