fixed most cross-browser issues so far