fixing malfunctions