Fixed moment bug where undefined was used as current date