Fixed calls to javascript