more fixes for https://github.com/ContinuumIO/bokeh/issues/697