fix several problemes