Bug fix

Fixed the problem where the program stopped executing.