fixing bugs in rest interface and views