fixed REST api crash