Fix Grid bag assertion

wxpython 3.0 throws assertion on bad gridbagsize indexes.
Fixing the same.