patch to manage a strange null pointer exception... Need investigation