Added conditional check.