fix write controller test