Fix sysconfig copy logic