fixed some parse bugs