fixed wrong comparison