Fixed middleware: should only make targets
Updated server