Fixed for compatibility with api changes in 1.0 branch