Fixed crash on NullPointerException.