Fixed bug where getDuration would return null under certain conditions