slight robustness error check