bugfix program never ends