fixed multithreading issue, switching on phone works now