Bug fixes in frontend