BUGFIX: check before shifting classes array in AvailableWidgets