stackoverflow bug fixed