Fixed some problems on app models