Fixed potential NPE
Fixed localization.