fixed data type issue in ajax method