fix bugs in RC loader