another try to fix activity detection, fixed sysouts