Fixed front-end to work with backend API