fixed missing endsWith