
386 So.2d 256 (1980)
Michael Alan SANDERS, Appellant,
v.
STATE of Florida, Appellee.
No. 80-519.
District Court of Appeal of Florida, Fifth District.
July 30, 1980.
Michael Alan Sanders, pro se.
Jim Smith, Atty. Gen., Tallahassee, and Gregory C. Smith, Asst. Atty. Gen., Daytona Beach, for appellee.
ORFINGER, Judge.
This appeal questions a summary denial of a motion for post-conviction relief under Rule 3.850, Florida Rules of Criminal Procedure.
The indictment under which appellant was charged with robbery alleged in pertinent part that Michael Alan Sanders:
"... did not on the 31st day of August, 1975, in Orange County, Florida, in violation of Florida Statute 813.011 unlawfully, by force, violence, assault and putting in fear, rob, steal, and take away from the person and custody of . ."
another, certain described property. Appellant pleaded guilty to the charge and was sentenced to imprisonment for nineteen years, less time served.
In his motion for relief, appellant seeks discharge on the ground that the trial court lacked jurisdiction to sentence him because Section 813.011, Florida Statutes (1973) had *257 been amended and transferred to Section 812.13, Florida Statutes (Supp. 1974), which became effective July 1, 1975 and therefore did not exist on the date the crime was committed. Additionally, appellant asserts that the indictment did not contain language to determine if he was armed with a weapon or unarmed "... therefore being the difference between a felony of the first degree or second degree."[1]
Appellant's contention that the court lacked jurisdiction because the incorrect statute was referred to in the indictment is without merit, because the necessary elements of the crime of robbery were alleged under either statute, so it cannot be said that the indictment wholly failed to allege a crime, and there is no showing that appellant was misled to his prejudice. Sinclair v. State, 46 So.2d 453 (Fla. 1950); Selley v. State, Case No. 78-115/T4-44, Fla. 5th DCA, May 28, 1980; King v. State, 336 So.2d 1200 (Fla. 2d DCA 1976), cert. dismissed, 434 U.S. 802, 98 S.Ct. 30, 54 L.Ed.2d 60 (1977).
By the language of appellant's pro se motion previously quoted here, it is obvious that he contends that the maximum sentence he could have received was fifteen years for a second-degree felony, and that his sentence of nineteen years exceeds the maximum authorized by law. This point has merit. The State contends that this cannot be raised by a motion for post-conviction relief and that it should have been raised on direct appeal, but Rule 3.850, Florida Rules of Criminal Procedure, clearly states that a motion for post-conviction relief may assert that the sentence imposed was in excess of the maximum authorized by law. A sentence not authorized by law is always subject to collateral attack. Skinner v. State, 366 So.2d 486 (Fla. 3d DCA 1979).
Since the indictment did not charge that appellant was armed with either a firearm, a deadly weapon or a weapon, he could only be found guilty of a second-degree felony under Section 812.13, Florida Statutes (Supp. 1974) and he should have been sentenced accordingly.
The judgment of the trial court is therefore affirmed insofar as it denies relief as to conviction, but the sentence is hereby set aside. The case is remanded to the trial court to resentence appellant for a second-degree felony, and appellant shall be present before the court for such re-sentencing.
Judgment of conviction AFFIRMED. Sentence SET ASIDE and remanded for resentencing.
COBB and FRANK D. UPCHURCH, JJ., concur.
NOTES
[1]  812.13, Florida Statutes (Supp. 1974), Robbery, more detailed than its predecessor Section 813.011, provides:

(1) "Robbery" means the taking of money or other property which may be the subject of larceny from the person or custody of another by force, violence, assault, or putting in fear. (2)(a) If in the course of committing the robbery the offender carried a firearm or other deadly weapon, then the robbery is a felony of the first degree, punishable by imprisonment for a term of years not exceeding life imprisonment or as provided in chapter 775.
(b) If in the course of committing the robbery the offender carried a weapon, then the robbery is a felony of the first degree, punishable as provided in chapter 775.
(c) If in the course of committing the robbery the offender carried no firearm, deadly weapon or other weapon, then the robbery is a felony of the second degree.
(3) An act shall be deemed "in the course of committing the robbery" if it occurs in an attempt to commit robbery or in flight after the attempt or commission.
