fixed problems from code analyse