Fixing buggy loop conditions (index variable out of range)
Improving "get" method for widgets