Added persistent buildmode support