fix frontend.cpp