Solve maybe undefined warning