fixed bug in frontend