Fixed JS. DIsplaying errors when not overwritten

Also improved issue #3