Bug fix for cross browser