I changed MAPS$ to MP$ in the function shown in the first screenshot.