More stupid NullPointerException fixes