Fixed the model so that app functions correctly.