finaly fixed version with fully working location handler deactivation if no background mode is required