Bug fix on Null Array Exception