Made program robust against missing data