safe input fix