Made flip feature work in Firefox