fixed small bug that killed js when it was in an iframe