internal: fix detection of running server based on pidfile