Problem with stopping my program