fixed gl crash and sigterm intercept