All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad is His slave and Messenger. We ask Allaah to exalt his mention as well as that of his family and all his companions.
Menses could exceed the time-period of its usual duration, and the bleeding outside the normal monthly menses as long as this does not exceed fifteen days. If the bleeding exceed fifteen-day period, there are some details about it but there is no need to mention them here, as your bleeding did not exceed fifteen days. Therefore, your bleeding is considered menses, so you are not allowed to perform prayers, fasting, and other things from which a woman in menses is prevented. Thus, what you did was correct and all perfect praise be to Allaah.
Allaah Knows best.