fix various error for correctly running...