Fixed some bugs wiht intbounds, unittests!