fixed first 2 NPE