fixed bug for autodetecting RCP