Bug fix for R2014b