Fixed up the code to work on the latest revision of chrome