improve bluetooth state management