Fixed issue where wrong PID was stored. Tests passing for HTTP server