Fixed backend bugs