clears and fixes