fixes some json errors and messed up URL