fixed potential stackoverflowerror