Corrected nullptr on endpointscript