+1 patch to solve the nil pointer exception