fixed logic error :)