Fixed day problem. Added security