Changed method of integral calculation
Now it works =)