Fixed sorting Bug,