fix onStateChanged for single devices