fixed bug that occured if app didn't run at port 5000