Have to fix the issue with date not passing correctly