update error checking and ajax pointer