Fixed issues with startsWith, endsWith and contains