bug fixes and date fix