fixed an issue with argument out of range in example project in some cases