fix bug in capa parsing