Javascript bugifxes
Fixed null pointer exception