printf/scanf bug fixed