changed a couple of lines of code in the rest api