Fix test and avoid calling callback when there is no content