Fixed a program bug