Fixed NullPointerException from the previous commit.