fixed some methods for REST