fix trailing comma bug