fixed usage of unitialized struct fields
fixed warnings