Quite heavy performance optimization by adding 3 lines