Fixed service crash - runonuithread

Signed-off-by: svenake <svenake@gmail.com>