Made a couple of changes to the working methond in the webapi controller