fixed bug with subset