NullPointers fixed