masked array bug fix