fixes typo in model, fixes js typo