fix state in detail view