fixed trailing comma bug