Flags that accept arguments are now handled correctly

Removing the risk of IndexErrors used 'index in list', which doesn't work as intended - so flags with arguments were rejected