fixed metadata, fixed various bugs