Fix CreateMenuEntry function in libs. TODO: fix in templates.