fixed stackoverflow