Fix for ajax call