Fixed JavaScript error with add new link