If it is not custom music, that is something very wierd...
Instead of using a script, try using a trigger.
If you are using a trigger, use a script.
If you are using Custom music, that you edited to keep file size down, it probably ends because you cut the sound off.
Play your OGG file, and listen at the end. if it comes to an abrupt end, then thats why.
I honestly never had this problem.
Also, make sure that things arent going in fast motion using setacctime..