Forgot <algorithm> in controller.cpp