Fixed js problems