fix problems with rest client
fix problems with rest client, commit after merge