More fixes for http://code.google.com/p/dygraphs/issues/detail?id=312