Adding option to stop second ajax call