Fix fatal error on get_scripts() controller method