Merge "Fix: possible null pointer dereference" into main