defensive programming to avoid warning