fix startsWith condition