Took out the check for currently running as it caused a different error.