Changed the 'start with' detection code