Fixed crash when window is destroyed. Added _VERSION variable to the plot module.