Some stack overflow mistakes fixed