Fixed infinite loop in autoqueue code

This should fix https://code.google.com/p/fookebox/issues/detail?id=10