fix document controller