fixed template check, fixed visible property in IE