Fix build and a npe