Fixed for api changes