Small fixes. (NullPointerException)