View switching fixed