fixed bug concerning the use of this in safari and firefox