fix bug in framework