Trying to fix the annoying termination error