fixed for php date errors and bad defaults