Fix bug - when creating first vertex from nothing

everything would blow up.
Fix firefox bugs