bug fix to legacy