[core] fixing some privacy issues on methods for compatibility with 5.4-5