Fixed a -1 issue in the backend.