Changed async to sync, since it could cause errors in express