fix virtualenv_loaded check.