removed singleton variable warnings and fixed the bug of not picking the h when available