fix #279: Stack overflows