several fixes to models and admin