Tiny JS fix for webkit browsers