Fixed program bug