fixed some frontend code