fixing errors from error log in front controller