Improved handling of bluetooth commands