Fix dangerous default argument for function