Fix bug with main activity loading