This sounds wrong if the frontend is not native. Should probably be moved inside the if?