Fixed JS poem looping bug