almost lured myself into another null pointer trap, fixed