Fix capturing warnings