Fixed bad .apply call