fix exit button, implement deviceReady