fixed some cross browser problems