fixed cross browser issues 2, 5, 7