Ajax calls are working properly