fixed bug and deprecated