FF and IE compatibility fix