Fixed cast in app restart cast