Fix code to avoid warning