Some fixes for typescript + chrome