Corrected the working of the console api call.