fix to cover all cases