Fixed crash in activity view