Add basic id validation & fix env release bug