some fixes on model, views, and admin