Added script execution even when there is only one device