Fixes some bugs with backend API.