datetime bug fixed