defensive programming to avoid warnings