Fixed added feature to support ajax