fixes bug introduced when API changed