Some fixes to make the standalone work properly.