Fixed onResume() bug
Fixed array out of bounds exception