Made Server side work with pty.js