Fixed bug making it fail in Webkit