fixing empty date error and multicode target error