Fix a NPE

The variable is not initialized prior of being used this generate an NPE. This code fix it.