Make sure g_set_error() is called with valid error domain and code
Don't use g_type_init() if not necessary
Small UI improvement