Add tests, fix ie6-8

Signed-off-by: yezhyk <kabanchig@gmail.com>