fix cookie issue @Author : Alex