added console.logs to track the not working back button problem