Major stack smash fixes caused with scanf.