fixed testing in __init__