clean up undefined properties