Fix to code from merge