fixing issue with date option