Fixed some issues of errors in the API Rest