Widgets added and PHP error fixed for version < 5.2