Fixed BUGS in REST communication