Solved incompatibility Double and Integer. But it still does not work as it should.