fix bug in execution + add test